Skip to content

fix: keep the desktop capture frame rate at the configured value - #274

Merged
devopvoid merged 1 commit into
devopvoid:mainfrom
SendableMetatype:fix/desktop-capture-frame-interval
Sep 7, 2026
Merged

fix: keep the desktop capture frame rate at the configured value#274
devopvoid merged 1 commit into
devopvoid:mainfrom
SendableMetatype:fix/desktop-capture-frame-interval

Conversation

@SendableMetatype

Copy link
Copy Markdown
Contributor

The desktop capture loop slept for a full frame interval after every CaptureFrame call, ignoring the time the capture itself took. With DXGI a capture can take a whole display refresh, so a source configured for 60 frames per second produced 30, which is the 32 ms cadence measured in #157, and higher settings changed nothing. The loop now measures the capture and sleeps only for the remainder of the interval. The CI runners have no display, so this is verified by the timing arithmetic, which matches the reported measurement exactly, rather than by a frame rate measurement.

Fixes #157

The capture loop slept for a full frame interval after every
CaptureFrame call, ignoring the time the capture itself took. With DXGI
a capture can take a whole display refresh, so a source configured for
60 frames per second produced 30, and higher settings changed nothing.
The loop now measures the capture and sleeps only for the remainder of
the interval.
@devopvoid
devopvoid merged commit dcd331e into devopvoid:main Sep 7, 2026
11 checks passed
@SendableMetatype
SendableMetatype deleted the fix/desktop-capture-frame-interval branch September 7, 2026 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Video with WindowCapturer: framerate max out at 30

2 participants